A network file computer system includes computers, known as clients, which allow remote access and sharing of data files of a file system as if the data files were stored locally on a hard disk drive of each client computer. The network file computer system is managed by another computer, known as a server. Requests from clients are received by and serviced through the server computer. The data files indicated by the client requests are made available by actions of the server and the clients executing a network file system protocol or code. The network file system protocol governs and establishes procedures and the actions within the network file computer system for responding to and servicing client requests.
The network file system protocol is a part of a mass storage operating system which controls an entire mass data storage computer system formed by one or more network file computer systems. The network file system protocol manages the sharing of data files between the client computers and the server computer. The network file system protocol allows the clients to conduct the basic operations of deleting, creating, editing, and reading data files stored on the server. Well-known network file system protocols are the Network File System (NFS), which is commonly used by the well-known UNIX operating system and the Common Internet File System (CIFS). Enhancements in the performance offered by CIFS and NFS are available from a Write Anywhere File Layout (WAFL) file system developed by Network Appliance, Inc. of Sunnyvale, Calif., the assignee of the present invention. WAFL is optimized for network environments where the servers are specifically tailored to provide a file system service through another network file system protocol, such as NFS and CIFS. WAFL provides performance enhancements which are not otherwise realized.
A typical network file computer system includes multiple nonvolatile mass storage devices in the form of hard disk drives, or other media storage devices such as optical media and solid state electrical devices. The hard disk drives are interconnected in groups and operate as a conventional redundant array of independent (or inexpensive) disks (RAID). Organizing and controlling the disk drives as a RAID group achieves substantial and well-known benefits of redundancy and protection against corruption for the data stored on the disk drives. The hard disk drives in each RAID group communicate with a central processing unit (CPU) or processor, which basically controls the transfer of data to and from the hard disk drives. A system memory is connected to the CPU. The system memory typically stores includes a portion which functions as temporary storage to hold data to be written on the hard disk drives. When the data has been successfully written to the hard disk drives, that data is erased and/or overwritten in the temporary storage memory. The data is written from the temporary storage memory to the hard disk drives only when those hard disk drives are not otherwise occupied by the execution of other previous or higher priority commands, thereby avoiding decreases in efficiency by not attempting to write the data when the hard disk drives are busy.
An unclean shutdown can adversely affect data to be written to the hard disk drives. An unclean shutdown refers to an unexpected interruption in operation of the network file computer system, usually as a result of an unexpected interruption in the supply of commercial electrical power to the computer system. Pending client requests to write data to the hard disk drives will not be successfully executed when the network file computer system ceases to function as a result of an unclean shutdown. In addition and because of the unexpected shutdown, it may be impossible to determine or reconstruct the pending client requests which were not successfully executed. The inability to reconstruct the previous state of the network file computer system prior to shut down is what gives rise to the indeterminate or “unclean” state.
Storing the data in the temporary storage portion of the system memory avoids adverse effects due to an unexpected interruption, such as an unclean shutdown, but only if the temporary storage memory is nonvolatile. One typical way of making the temporary storage memory nonvolatile is to supply it with its own source of backup electrical power, usually from a battery. The battery assures that the temporary storage memory is not susceptible to data loss and will continue to store the data in the event of a power interruption. The nonvolatile temporary memory stores the data until it has been successfully written to the disk drive. When the data has been successfully written to the hard disk drive, the data in the temporary storage memory is erased or overwritten. Of course, once data is stored on a hard disk drive, that storage is nonvolatile due to the inherent magnetic effects of the hard disk drive.
For every client request to write data to the disk drives, two copies of the same data are typically made and stored in the temporary storage memory. Separately storing the additional or redundant copies of the data is necessary for some network file system protocols, such as WAFL, because the file system protocol relies upon the second complete copy of the data to recover after the unclean shutdown. Absent the second copy of the data, the network file system cannot recover the data that failed to be written to the hard disks prior to the unclean shutdown.
Making two copies of the data in the temporary storage memory consumes computational resources and increases the amount of data traffic with the temporary storage portion of the system memory, all of which reduces the overall efficiency and throughput of the network file computer system. The necessity to store a redundant copy of the data also consumes the temporary storage memory, thereby requiring larger amounts of system memory.